<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>社区养老服务信息系统</title>
	</head>
	<link rel="stylesheet" type="text/css" href="../js/layui/css/layui.css"/>
	<script src="../js/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/JQuery.js" type="text/javascript" charset="utf-8"></script>
	<style type="text/css">
		body{background-color: white;font-family: "Microsoft Yahei";font-size: 16px;margin: auto;}
		.title{display: inline-block; font-size: 30px;font-weight: bold;margin-top: 10px;margin-left: 150px;}
		.list{margin: auto;background-color: antiquewhite;padding-left: 400px;}
		.type{display: inline-block;padding-left: 100px;}
		.test{width: 2000px;height: 2000px;background-color: #0000FF;display: block;position: absolute;}
		.one{display:none}
		.two{display:none}
		.seven{display:none}
		.four{display:none}
		.five{display:none;width: 400px;height: 400px;border-color: #000000;margin: auto;border-radius: 10px;position: relative;top: 0px;right: 100px;background-color: white;opacity: 0.9;}
		.three{display:none;}
		.six{display:none;width: 400px;height: 400px;border-color: #000000;border-radius: 10px;position: relative;left:600px;background-color: white;opacity: 0.9;}
		.head{display: block;text-align: center;font-size: 28px;font-weight: bold;padding-top: 30px;}
		.unite{margin-top: 10px;font-size: 20px;margin-left: 50px;}
		.unite div:nth-child(1){display: inline-block;width: 90px;margin-left: 10px;}
		.unite div:nth-child(2){display: inline-block;width: 100px;}
		.unite div:nth-child(3){display: inline-block;width: 90px;}
		.layui-btn-normal{margin: auto;display: block;width: 200px;margin-top: 20px;}
		.mengceng{display:none;background-color:gray;left:0;opacity: 0.5;position: absolute;top: 0;z-index: 1;width: 100%;height: 100%;}
		.mengcengshang{display:none;background-color:white;margin: auto; position: absolute;margin-top: 200px; left: 700px; z-index: 1;width: 350px;height: 220px;}
		
	</style>
	<body>
		<div class="mengceng"></div>
		<div class="mengcengshang">
			<div class=" unite">
						<span class="">评价等级:</span>
						<input type="text" name="" id="appraisal_grade" placeholder="好/较好/一般/差/极差"/>
			</div>
			<div class=" unite">
						<span class="">评价内容:</span>
						<input type="text" name="" id="appraisal_content" placeholder=""/>
			</div>
			<button class="layui-btn layui-btn-normal" id="updatemessagebtn">提交</button>
		</div>
		<div class="heads">
			<span class="title">社区养老服务信息系统</span>
			<span class="type">登录类型：</span>
			<span>用户</span>
			<span class="type">账号：</span>
			<span>${account_id }</span>
		</div>
		<div>
			<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
			  <ul class="layui-tab-title list">
			    <li id="mara">服务订阅</li><!-- 服务信息的查询 支付-->
			    <li id="mara2">服务记录管理</li><!-- 服务查看 服务进度管理（退订/订单完成）  服务评价 -->
			    <li id="mara7">疾病查看</li>
			    <li id="mara3">评价记录</li>
			    <li id="mara4">资金记录</li>
				<li id="mara5">个人信息修改</li>
				<li id="mara6">密码修改</li>
			  </ul>
			  <div class="layui-tab-content"></div>
			</div> 
		</div>
		
		
		<div class="one">
		<button type="button" class="selects" style="display: inline-block; width: 80px; height: 30px; position: relative; left: 400px; top: 0px">服务查询</button>
			<div
				style="display: inline-block; width: 50px; height: 30px; position: relative; left: 400px; top: 0px">
				<input type="text" class="service_name" style="display: inline-block;"></div>
			<table class="layui-table table">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>服务编号</th>
			      <th>服务名称</th>
			      <th>服务内容</th>
				  <th>服务价格</th>
				  <th>服务者id</th>
				  <th>服务者名字</th>
				  <th>服务者性别</th>
				  <th>服务者电话</th>
			    </tr> 
			  </thead>
			  <tbody id="fenye">
			  </tbody>
			</table>
			<div class="first"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">首页</div>
			<div class="prev"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">上一页</div>
			<div class="next"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">下一页</div>
			<div class="last "
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">尾页</div>
			<div class="indexpage"
				style="display: inline-block; width: 150px; height: 100px; position: relative; left: 400px; top: 20px"></div>
			<button type="button" class="jumps" style="display: inline-block; width: 60px; height: 30px; position: relative; left: 400px; top: 20px">跳转至</button>
			<div class="jump"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">
				<input type="text" class="jumppage" style="display: inline-block;"></div>
		</div>
		
		<div class="two">
			<table class="layui-table table">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>订单编号</th>
			      <th>创建时间</th>
			      <th>服务日期</th>
				  <th>服务完成时间</th>
				  <th>服务状态</th>
				  <th>服务价格</th>
				  <th>服务名称</th>
				  <th>服务内容</th>
				  <th>服务人员编号</th>
				  <th>服务人员名字</th>
				  <th>服务人员性别</th>
				  <th>服务人员电话</th>
			    </tr> 
			  </thead>
			  <tbody id="fenyex">
			  </tbody>
			</table>
			<div class="firstx"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">首页</div>
			<div class="prevx"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">上一页</div>
			<div class="nextx"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">下一页</div>
			<div class="lastx "
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">尾页</div>
			<div class="indexpagex"
				style="display: inline-block; width: 150px; height: 100px; position: relative; left: 400px; top: 20px"></div>
			<button type="button" class="jumpx" style="display: inline-block; width: 60px; height: 30px; position: relative; left: 400px; top: 20px">跳转至</button>
			<div class="jumpsx"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">
				<input type="text" class="jumppagex" style="display: inline-block;"></div>
		</div>
		<div class="seven">
			<table class="layui-table table">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>疾病名称</th>
			      <th>疾病参数</th>
			    </tr> 
			  </thead>
			  <tbody id="fenye7">
			  </tbody>
			</table>
		</div>
		<div class="three">
			<table class="layui-table table">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>评价id</th>
			      <th>评价等级</th>
			      <th>评价内容</th>
				  <th>评价人</th>
				  <th>订单号</th>
			    </tr> 
			  </thead>
			  <tbody id="fenye3">
			  </tbody>
			</table>
			<div class="first3"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">首页</div>
			<div class="prev3"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">上一页</div>
			<div class="next3"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">下一页</div>
			<div class="last3 "
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">尾页</div>
			<div class="indexpage3"
				style="display: inline-block; width: 150px; height: 100px; position: relative; left: 400px; top: 20px"></div>
			<button type="button" class="jump3" style="display: inline-block; width: 60px; height: 30px; position: relative; left: 400px; top: 20px">跳转至</button>
			<div class="jumps3"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">
				<input type="text" class="jumppage3" style="display: inline-block;"></div>
		</div>
		<div class="four">
			<table class="layui-table table">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>资金编号</th>
			      <th>操作类型</th>
			      <th>操作金额</th>
				  <th>操作日期</th>
			    </tr> 
			  </thead>
			  <tbody id="fenye2">
			  </tbody>
			</table>
			<div class="first2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">首页</div>
			<div class="prev2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">上一页</div>
			<div class="next2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">下一页</div>
			<div class="last2 "
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">尾页</div>
			<div class="indexpage2"
				style="display: inline-block; width: 150px; height: 100px; position: relative; left: 400px; top: 20px"></div>
			<button type="button" class="jump2" style="display: inline-block; width: 60px; height: 30px; position: relative; left: 400px; top: 20px">跳转至</button>
			<div class="jumps2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">
				<input type="text" class="jumppage2" style="display: inline-block;"></div>
		</div>
		<div class="five">
			<div class="login_body">
					<div class=" unite">
						<span class="">老人编号:</span>
						<input type="text" name="" id="five1" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原来姓名:</span>
						<input type="text" name="" id="five2" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的姓名:</span>
						<input type="text" name="" id="five22" value=""  placeholder="姓名" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原来性别:</span>
						<input type="text" name="" id="five3" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的性别:</span>
						<input type="text" name="" id="five33" value=""  placeholder="性别" maxlength="1"/>
					</div>
					<div class=" unite">
						<span class="">原身份证:</span>
						<input type="text" name="" id="five4" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新身份证:</span>
						<input type="text" name="" id="five44" value=""  placeholder="身份证号" maxlength="18"/>
					</div>
					<div class=" unite">
						<span class="">原身地址:</span>
						<input type="text" name="" id="five5" value="" readonly="readonly" style="color: red"  placeholder="" />
					</div>
					<div class=" unite">
						<span class="">新的地址:</span>
						<input type="text" name="" id="five55" value=""  placeholder="地址" />
					</div>
					<div class=" unite">
						<span class="">原来电话:</span>
						<input type="text" name="" id="five6" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的电话:</span>
						<input type="text" name="" id="five66" value=""  placeholder="老人电话" maxlength="11"/>
					</div>
					<div class=" unite">
						<span class="">原来内容:</span>
						<input type="text" name="" id="five7" value="" readonly="readonly" style="color: red"  placeholder="" />
					</div>
					<div class=" unite">
						<span class="">新的内容:</span>
						<input type="text" name="" id="five77" value=""  placeholder="老人介绍" />
					</div>
					<div class=" unite">
						<span class="">原来电话:</span>
						<input type="text" name="" id="five8" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的电话:</span>
						<input type="text" name="" id="five88" value=""  placeholder="老人家人电话" maxlength="11"/>
					</div>
					<button class="layui-btn layui-btn-normal" id="five99">修改</button>
				</div>
		</div>
		<div class="six">
			<div class="login_body" style="position: relative;top: 100px">
					<div class="login_yonghumings unite">
						<span class="login_yonghuming">原&nbsp;&nbsp;密&nbsp;&nbsp;码：</span>
						<input type="password" name="" id="password11" value="" placeholder="原密码" maxlength="20"/>
					</div>
					<div class="login_mimas unite">
						<span class="login_mima">新&nbsp;&nbsp;密&nbsp;&nbsp;码：</span>
						<input type="password" name="" id="password22" value="" placeholder="新密码" maxlength="20"/>
					</div>
					<div class="login_mimas unite">
						<span class="login_mima">确认&nbsp;密码：</span>
						<input type="password" name="" id="password33" value="" placeholder="确认密码" maxlength="20"/>
					</div>
					<button class="layui-btn layui-btn-normal" id="six11">修改</button>
				</div>
		</div>
		<div class="bottom" style="display: block;width: 100%;height: 70px;background-color: antiquewhite;position: absolute;bottom: 0;font-size: 12px">
			<span style="display: block;position: absolute;top: 15px;left: 38%;">如遇问题欢迎致电  热线电话：15979292103 阳雨晨 版权所有</span>
				<span style="display: block;position: absolute;top: 40px;left: 40%;">Copyright © 2020 Create By YangYuChen </span>
		</div>
	</body>
	<script type="text/javascript">
		window.onload=$(function(){
			$("#mara").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"block"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				$(".seven").css({display:"none"});
				var pagesum=1;//总页数
				var page=0;//当前页数-1
				var temp=0;//根据数据总数和余数获取for循环的循环次数
				var account_id=${account_id}
				$.post("${pageContext.request.contextPath}/consumer/getServicePages",{},function(data){
					data = eval(data); 
					pagesum=data;
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$.post("${pageContext.request.contextPath}/consumer/getServices",{page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].service_id+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].service_price+"<button class='today' value="+data[i].service_price+"|"+data[i].servicer_id+">预约今天</button><button class='tommory' value="+data[i].service_price+"|"+data[i].servicer_id+">预约明天</button></td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$(".next").click(function(){
				if(page+1<pagesum){
					page=page+1;
				}else{
					page=page;
				}
				$.post("${pageContext.request.contextPath}/consumer/getServices",{page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].service_id+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].service_price+"<button class='today' value="+data[i].service_price+"|"+data[i].servicer_id+">预约今天</button><button class='tommory' value="+data[i].service_price+"|"+data[i].servicer_id+">预约明天</button></td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".prev").click(function(){
				if(page>0){
					page=page-1;
				}else{
					page=page;
				} 
				$.post("${pageContext.request.contextPath}/consumer/getServices",{page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].service_id+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].service_price+"<button class='today' value="+data[i].service_price+"|"+data[i].servicer_id+">预约今天</button><button class='tommory' value="+data[i].service_price+"|"+data[i].servicer_id+">预约明天</button></td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".first").click(function(){
				page=0; 
				$.post("${pageContext.request.contextPath}/consumer/getServices",{page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].service_id+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].service_price+"<button class='today' value="+data[i].service_price+"|"+data[i].servicer_id+">预约今天</button><button class='tommory' value="+data[i].service_price+"|"+data[i].servicer_id+">预约明天</button></td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".last").click(function(){
					page=pagesum-1;
					$.post("${pageContext.request.contextPath}/consumer/getServices",{page:(page+1)},function(data){
						data = eval(data); 
						temp=data.length;
						var content="";
						for(var i = 0;i<temp;i++){
							content += "<tr><td>"+data[i].service_id+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].service_price+"<button class='today' value="+data[i].service_price+"|"+data[i].servicer_id+">预约今天</button><button class='tommory' value="+data[i].service_price+"|"+data[i].servicer_id+">预约明天</button></td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
						}
						$("#fenye").html(content);
						$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
					});});
				$(".jumps").click(function(){
					if($(".jumppage").val()>pagesum||$(".jumppage").val()==""){
						alert("超过最大页数/不合法数字");
					}else{
						page=$(".jumppage").val()-1;
					}
					$.post("${pageContext.request.contextPath}/consumer/getServices",{page:(page+1)},function(data){
						data = eval(data); 
						temp=data.length;
						var content="";
						for(var i = 0;i<temp;i++){
							content += "<tr><td>"+data[i].service_id+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].service_price+"<button class='today' value="+data[i].service_price+"|"+data[i].servicer_id+">预约今天</button><button class='tommory' value="+data[i].service_price+"|"+data[i].servicer_id+">预约明天</button></td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
						}
						$("#fenye").html(content);
						$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
					});});
				$(".selects").click(function(){
					var service_names=$(".service_name").val();
					var service_name='%'+service_names+'%';
					$.post("${pageContext.request.contextPath}/consumer/selectServices",{service_name:service_name},function(data){
						data = eval(data); 
						temp=data.length;
						var content="";
						for(var i = 0;i<temp;i++){
							content += "<tr><td>"+data[i].service_id+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].service_price+"<button class='today' value="+data[i].service_price+"|"+data[i].servicer_id+">预约今天</button><button class='tommory' value="+data[i].service_price+"|"+data[i].servicer_id+">预约明天</button></td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
						}
						$("#fenye").html(content);
					});
				})
				$("#fenye").delegate(".today","click",function(){
					var string=$(this).val();
					var strs = new Array(); //定义一数组
					strs = string.split("|"); //字符分割
					var order_price=strs[0];
					var servicer_id=strs[1];
					var dateType='1';
					var servicer='一';
					$.post("${pageContext.request.contextPath}/consumer/insertUserFunds",{funds_type:'支出',funds_amount:order_price,account_id:account_id,servicer_id:servicer_id},function(data){
						data = eval(data); 
						$.post("${pageContext.request.contextPath}/consumer/insertUserFunds",{funds_type:'收取',funds_amount:order_price,account_id:servicer,servicer_id:servicer_id},function(data){
							data = eval(data); 
						});
					});
					$.post("${pageContext.request.contextPath}/consumer/insertOrders",{dateType:dateType,order_price:order_price,order_price:order_price,servicer_id:servicer_id,account_id:account_id},function(data){
						data = eval(data); 
					});
				});
				$("#fenye").delegate(".tommory","click",function(){
					var string=$(this).val();
					var strs = new Array(); //定义一数组
					strs = string.split("|"); //字符分割
					var order_price=strs[0];
					var servicer_id=strs[1];
					var dateType='2';
					var servicer='';
					$.post("${pageContext.request.contextPath}/consumer/insertUserFunds",{funds_type:'支出',funds_amount:order_price,account_id:account_id,servicer_id:servicer_id},function(data){
						data = eval(data); 
						$.post("${pageContext.request.contextPath}/consumer/insertUserFunds",{funds_type:'收取',funds_amount:order_price,account_id:servicer,servicer_id:servicer_id},function(data){
							data = eval(data); 
						});
					});
					$.post("${pageContext.request.contextPath}/consumer/insertOrders",{dateType:dateType,order_price:order_price,order_price:order_price,servicer_id:servicer_id,account_id:account_id},function(data){
						data = eval(data); 
					});
				});
			});
			$('#mara').trigger("click");
			$("#mara2").click(function(){
				$(".two").css({display:"block"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				$(".seven").css({display:"none"});
				var pagesum=1;//总页数
				var page=0;//当前页数-1
				var temp=0;//根据数据总数和余数获取for循环的循环次数
				var account_id=${account_id};
				$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicerPage",{account_id:account_id},function(data){
					data = eval(data); 
					pagesum=data;
					$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenyex").html(content);
					$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$(".nextx").click(function(){
				if(page+1<pagesum){
					page=page+1;
				}else{
					page=page;
				}
				$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenyex").html(content);
					$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".prevx").click(function(){
				if(page>0){
					page=page-1;
				}else{
					page=page;
				} 
				$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenyex").html(content);
					$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".firstx").click(function(){
				page=0; 
				$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:1},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenyex").html(content);
					$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".lastx").click(function(){
					page=pagesum-1;
				$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:pagesum},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenyex").html(content);
					$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".jumpx").click(function(){
					if($(".jumppagex").val()>pagesum||$(".jumppagex").val()==""){
						alert("超过最大页数/不合法数字");
					}else{
						page=$(".jumppagex").val()-1;
					}
				$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
					}
					$("#fenyex").html(content);
					$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				
				$("#fenyex").delegate(".quxiao","click",function(){
					var string=$(this).val();
					var strs = new Array(); //定义一数组
					strs = string.split("|"); //字符分割
					var order_id =strs[0];
					var order_status='取消';
					var servicer='一';
					var servicer_id=strs[2];
					var order_price=strs[3];
					if(strs[1]=="未完"){
						$.post("${pageContext.request.contextPath}/consumer/insertUserFunds",{funds_type:'收取',funds_amount:order_price,account_id:account_id,servicer_id:servicer_id},function(data){
							data = eval(data); 
							$.post("${pageContext.request.contextPath}/consumer/insertUserFunds",{funds_type:'支出',funds_amount:order_price,account_id:servicer,servicer_id:servicer_id},function(data){
								data = eval(data); 
							});
						});
						$.post("${pageContext.request.contextPath}/consumer/updateOrder",{order_id:order_id,order_status:order_status},function(data){
							data = eval(data); 
							if(data==true||data=="true"){
								$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:(page+1)},function(data){
									data = eval(data); 
									temp=data.length;
									var content="";
									for(var i = 0;i<temp;i++){
										content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
									}
									$("#fenyex").html(content);
									$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
								});
							}else{
								alert('修改失败');
							}
						});
					}
				});
				$("#fenyex").delegate(".wancheng","click",function(){
					var string=$(this).val();
					var strs = new Array(); //定义一数组
					strs = string.split("|"); //字符分割
					var order_id =strs[0];
					if(strs[1]=="未完"){
						$.post("${pageContext.request.contextPath}/consumer/updateOrders",{order_id:order_id},function(data){
							data = eval(data); 
							if(data==true||data=="true"){
								$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:(page+1)},function(data){
									data = eval(data); 
									temp=data.length;
									var content="";
									for(var i = 0;i<temp;i++){
										content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
									}
									$("#fenyex").html(content);
									$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
								});
							}else{
								alert('修改失败');
							}
						});
					}
				});
				$("#fenyex").delegate(".pingjia","click",function(){
					var string=$(this).val();
					var strs = new Array(); //定义一数组
					strs = string.split("|"); //字符分割
					var order_id =strs[0];
					var order_status='已评';
					if(strs[1]=="完成"){
						$(".mengceng").css({display:"block"});
						$(".mengcengshang").css({display:"block"});
					}
					$("#updatemessagebtn").click(function(){
						if(strs[1]=="完成"){
							var appraisal_grade=$("#appraisal_grade").val();
							var appraisal_content=$("#appraisal_content").val();
							$.post("${pageContext.request.contextPath}/consumer/updateOrder",{order_id:order_id,order_status:order_status},function(data){
								data = eval(data); 
								if(data==true||data=="true"){
									$.post("${pageContext.request.contextPath}/consumer/insertAppraisal",{appraisal_grade:appraisal_grade,appraisal_content:appraisal_content,account_id:account_id,order_id:order_id},function(data){
										data = eval(data); 
										if(data==true||data=="true"){
											$(".mengceng").css({display:"none"});
											$(".mengcengshang").css({display:"none"});
											$.post("${pageContext.request.contextPath}/consumer/getOrderServiceServicer",{account_id:account_id,page:(page+1)},function(data){
												data = eval(data); 
												temp=data.length;
												var content="";
												for(var i = 0;i<temp;i++){
													content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"<button class='quxiao' value="+data[i].order_id+"|"+data[i].order_status+"|"+data[i].servicer_id+"|"+data[i].order_price+">取消</button><button class='wancheng' value="+data[i].order_id+"|"+data[i].order_status+">确认完成</button><button class='pingjia' value="+data[i].order_id+"|"+data[i].order_status+">评价</button></td><td>"+data[i].order_price+"</td><td>"+data[i].service_name+"</td><td>"+data[i].service_content+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].servicer_name+"</td><td>"+data[i].servicer_sex+"</td><td>"+data[i].servicer_tel+"</td></tr>";
												}
												$("#fenyex").html(content);
												$(".indexpagex").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
											});
										}else{
											alert('修改失败');
											$.post("${pageContext.request.contextPath}/consumer/updateOrder",{order_id:order_id,order_status:'完成'},function(data){
												data = eval(data); 
												if(data==true||data=="true"){
												}else{
													alert('修改失败');
												}
											});
										}
									});
								}else{
									alert('修改失败');
								}
							});
							$(".mengceng").css({display:"none"});
							$(".mengcengshang").css({display:"none"});
						}
					})
				});
			});
			$("#mara7").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				$(".seven").css({display:"block"});
				var account_id=${account_id};
				$.post("${pageContext.request.contextPath}/consumer/getdiseases",{account_id:account_id},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].disease_name+"</td><td>"+data[i].disease_parameter+"</td></tr>";
					}
					$("#fenye7").html(content);
				});
			});
			$("#mara3").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"block"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				$(".seven").css({display:"none"});
				var pagesum=0;//总页数
				var page=0;//当前页数-1
				var temp=0;//根据数据总数和余数获取for循环的循环次数
				var account_id=${account_id};
				$.post("${pageContext.request.contextPath}/consumer/getAppraisalPages",{account_id:account_id},function(data){
					data = eval(data); 
					pagesum=data;
					$(".indexpage3").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$.post("${pageContext.request.contextPath}/consumer/getAppraisals",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye3").html(content);
					$(".indexpage3").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$(".next3").click(function(){
				if(page+1<pagesum){
					page=page+1;
				}else{
					page=page;
				}
				$.post("${pageContext.request.contextPath}/consumer/getAppraisals",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye3").html(content);
					$(".indexpage3").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".prev3").click(function(){
				if(page>0){
					page=page-1;
				}else{
					page=page;
				} 
				$.post("${pageContext.request.contextPath}/consumer/getAppraisals",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye3").html(content);
					$(".indexpage3").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".first3").click(function(){
				page=0; 
				$.post("${pageContext.request.contextPath}/consumer/getAppraisals",{account_id:account_id,page:1},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye3").html(content);
					$(".indexpage3").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".last3").click(function(){
					page=pagesum-1;
				$.post("${pageContext.request.contextPath}/consumer/getAppraisals",{account_id:account_id,page:pagesum},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye3").html(content);
					$(".indexpage3").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".jump3").click(function(){
					if($(".jumppage3").val()>pagesum||$(".jumppage3").val()==""){
						alert("超过最大页数/不合法数字");
					}else{
						page=$(".jumppage3").val()-1;
					}
				$.post("${pageContext.request.contextPath}/consumer/getAppraisals",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye3").html(content);
					$(".indexpage3").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
			});
			$("#mara4").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"block"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				$(".seven").css({display:"none"});
				var pagesum=1;//总页数
				var page=0;//当前页数-1
				var temp=0;//根据数据总数和余数获取for循环的循环次数
				var account_id=${account_id}
				$.post("${pageContext.request.contextPath}/consumer/getFundsPage",{account_id:account_id},function(data){
					data = eval(data); 
					pagesum=data;
				});
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$(".next2").click(function(){
				if(page+1<pagesum){
					page=page+1;
				}else{
					page=page;
				}
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".prev2").click(function(){
				if(page>0){
					page=page-1;
				}else{
					page=page;
				} 
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".first2").click(function(){
				page=0; 
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:1},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".last2").click(function(){
					page=pagesum-1;
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:pagesum},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".jump2").click(function(){
					if($(".jumppage2").val()>pagesum||$(".jumppage2").val()==""){
						alert("超过最大页数/不合法数字");
					}else{
						page=$(".jumppage2").val()-1;
					}
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
			});
			$("#mara5").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"block"});
				$(".six").css({display:"none"});
				$(".seven").css({display:"none"});
				var account_id=${account_id};
				$.post("${pageContext.request.contextPath}/consumer/selectOldpeople",{account_id:account_id},function(data){
					data = eval(data); 
					$("#five1").val(data.oldpeople_id);
					$("#five2").val(data.oldpeople_name);
					$("#five3").val(data.oldpeople_sex);
					$("#five4").val(data.oldpeople_idcard);
					$("#five5").val(data.oldpeople_address);
					$("#five6").val(data.oldpeople_tel);
					$("#five7").val(data.oldpeople_description);
					$("#five8").val(data.oldpeople_familytel);
				});
				$("#five99").click(function(){
					var oldpeople_id=$("#five1").val();
					var oldpeople_name;
					var oldpeople_sex;
					var oldpeople_idcard;
					var oldpeople_address;
					var oldpeople_tel;
					var oldpeople_description;
					var oldpeople_familytel;
					if($("#five22").val()==""){
						oldpeople_name=$("#five2").val();
					}else{
						oldpeople_name=$("#five22").val();
					}
					if($("#five33").val()==""){
						oldpeople_sex=$("#five3").val();
					}else{
						oldpeople_sex=$("#five33").val();
					}
					if($("#five44").val()==""){
						oldpeople_idcard=$("#five4").val();
					}else{
						oldpeople_idcard=$("#five44").val();
					}
					if($("#five55").val()==""){
						oldpeople_address=$("#five5").val();
					}else{
						oldpeople_address=$("#five55").val();
					}
					if($("#five66").val()==""){
						oldpeople_tel=$("#five6").val();
					}else{
						oldpeople_tel=$("#five66").val();
					}
					if($("#five77").val()==""){
						oldpeople_description=$("#five7").val();
					}else{
						oldpeople_description=$("#five77").val();
					}
					if($("#five88").val()==""){
						oldpeople_familytel=$("#five8").val();
					}else{
						oldpeople_familytel=$("#five88").val();
					}
					$.post("${pageContext.request.contextPath}/consumer/updateOldpeople",{oldpeople_id:oldpeople_id,oldpeople_name:oldpeople_name,oldpeople_sex:oldpeople_sex,oldpeople_idcard:oldpeople_idcard,oldpeople_address:oldpeople_address,oldpeople_tel:oldpeople_tel,oldpeople_description:oldpeople_description,oldpeople_familytel:oldpeople_familytel},function(data){
						data = eval(data); 
						if(data==true||data=="true"){
							$.post("${pageContext.request.contextPath}/consumer/selectOldpeople",{account_id:account_id},function(data){
								data = eval(data); 
								$("#five1").val(data.oldpeople_id);
								$("#five2").val(data.oldpeople_name);
								$("#five3").val(data.oldpeople_sex);
								$("#five4").val(data.oldpeople_idcard);
								$("#five5").val(data.oldpeople_address);
								$("#five6").val(data.oldpeople_tel);
								$("#five7").val(data.oldpeople_description);
								$("#five8").val(data.oldpeople_familytel);
							});
							$("#five22").val("");
							$("#five33").val("");
							$("#five44").val("");
							$("#five55").val("");
							$("#five66").val("");
							$("#five77").val("");
							$("#five88").val("");
						}else{
							alert("修改失败");
						}
					});
				})
			});
			$("#mara6").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"block"});
				$(".seven").css({display:"none"});
				$("#six11").click(function(){
					var password11=$("#password11").val();
					var account_password=$("#password22").val();
					var password33=$("#password33").val();
					var account_type="1";
					if(account_password==password33){
						var account_id=${account_id};
						var params={
								account_id:account_id,
								account_password:password11,
								account_type:account_type
						};
						$.post("${pageContext.request.contextPath}/consumer/logins",params,function(data){
							data = eval(data); 
							if(data==true||data=="true"){
								$.post("${pageContext.request.contextPath}/consumer/updateAccount",{account_id:account_id,account_password:account_password},function(data){
									data = eval(data); 
									if(data==true||data=="true"){
										window.location="${pageContext.request.contextPath }/jsp/login.jsp";
									}
								});
							}else{
								alert("原密码错误");
							}
						});
					}else{
						alert("确认密码错误");
					}
				})
			});
		})
	</script>
</html>
